////////////////////////////////////////////////////////////////////////////////
//                      (c) Intelliquip, Inc. 2001
////////////////////////////////////////////////////////////////////////////////
// $Log:
//  17   Intelliquip Company Wide1.16        11/18/2002 8:57:06 AM  Jeff Heigl
//           ITEM_XML_JSP var fixed for new nevigation scheme
//  16   Intelliquip Company Wide1.15        10/30/2002 3:08:10 PM  Jonathan
//       Lutz   IDD #1499: Eliminated Java code from JSP.
//  15   Intelliquip Company Wide1.14        10/8/2002 8:02:50 AM   Wayne
//       Hefner    Added ItemXML as a valid page
//  14   Intelliquip Company Wide1.13        10/2/2002 10:49:34 AM  Jonathan
//       Lutz   IDD #1437: Renamed ConditionsOfServiceBasic.jsp to
//       ConditionsOfService.jsp for KSB.  Merged all COS page cases in
//       NavigationFlags.jsp so that everyone points to same case.  Overrided
//       hash mapping for COS screen such that all COS screens point to
//       "ConditionsOfService.jsp", no matter what the organization.
//  13   Intelliquip Company Wide1.12        7/11/2002 2:10:08 PM   Eddie Carr
//           RM 7/11/02 2:06:54 PM EDT: Modified to support framed approach for
//       KSB
//  12   Intelliquip Company Wide1.11        7/11/2002 2:10:07 PM   Eddie Carr
//           RM 7/11/02 2:06:53 PM EDT: IDD 835 - Regenerate selection for temp
//       Item
//  11   Intelliquip Company Wide1.10        7/11/2002 2:10:06 PM   Eddie Carr
//           RM 7/11/02 2:06:52 PM EDT: Modifications to run with latest Item
//       Manager.
//  10   Intelliquip Company Wide1.9         7/11/2002 2:10:05 PM   Eddie Carr
//           RM 7/11/02 2:06:51 PM EDT: added some new constants for SSO module
//  9    Intelliquip Company Wide1.8         7/11/2002 2:10:04 PM   Eddie Carr
//           RM 7/11/02 2:06:50 PM EDT: IDD 0136
//  8    Intelliquip Company Wide1.7         7/11/2002 2:10:03 PM   Eddie Carr
//           RM 7/11/02 2:06:49 PM EDT: Changes for latest KSB demo.
//  7    Intelliquip Company Wide1.6         7/11/2002 2:10:02 PM   Eddie Carr
//           RM 7/11/02 2:06:48 PM EDT: Support for web server independent
//       login.
//  6    Intelliquip Company Wide1.5         7/11/2002 2:10:01 PM   Eddie Carr
//           RM 7/11/02 2:06:46 PM EDT: Added page alerting user to a session
//       timeout.  Also, did some cleanup.
//  5    Intelliquip Company Wide1.4         7/11/2002 2:09:59 PM   Eddie Carr
//           RM 7/11/02 2:06:45 PM EDT: IDD 0049 - Made changes to support
//       showing different start page based on the user login.
//  4    Intelliquip Company Wide1.3         7/11/2002 2:09:59 PM   Eddie Carr
//           RM 7/11/02 2:06:45 PM EDT: Changes to support the German
//       performance datasheet page.
//  3    Intelliquip Company Wide1.2         7/11/2002 2:09:58 PM   Eddie Carr
//           RM 7/11/02 2:06:44 PM EDT:
//  2    Intelliquip Company Wide1.1         7/11/2002 2:09:57 PM   Eddie Carr
//           RM 7/11/02 2:06:43 PM EDT:
//  1    Intelliquip Company Wide1.0         7/11/2002 2:09:57 PM   Eddie Carr
//           RM 7/11/02 2:06:42 PM EDT:
// $// $NoKeywords$
////////////////////////////////////////////////////////////////////////////////

package com.intelliquip.hydraulicselection.control.web;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

import com.intelliquip.util.ServletUtils;


/**
 * This class contains constant Ids to identify all of the screens used
 * by the sample application. It also contains all of the
 * constants for the URLs and JSPs which map to screens. This class is used
 * by the com.sun.estore.control.web.ScreenFlowManager,
 * ScreenDefinitions.jsp page, and PageFactory.
 *
 * To add a new entry, add constants for the Screen ID, URL and JSP.
 * Then update the 3 maps that relate these variables.
*/
public class ScreenNames
{
	/**
	 * Logger for this class
	 */
	private static final Logger log = Logger.getLogger(ScreenNames.class);

	/*
	 * constants
	 */
	public static final String PARTY_PREFERENCES_PATH = "/SaveSettingsRedirect?destAppTarget=Party/app/preferences";

	/*
	 * Screen IDs
	 */
	public static final int CONDITIONS_OF_SERVICE_SCREEN = 2;
	public static final int NAVIGATION_SCREEN = 5;
	public static final int LOGIN_SCREEN = 6;
	public static final int PERFORMANCE_CURVE_SCREEN = 7;
	public static final int PERFORMANCE_DATASHEET_SCREEN = 8;
	public static final int PRODUCT_LINES_SCREEN = 10;
	public static final int PUMP_SIZE_LIST_SCREEN = 11;
	public static final int SEARCH_RESULTS_SCREEN = 12;
	public static final int SESSION_TIMEOUT_SCREEN = 13;
	public static final int START_PAGE_SCREEN = 14;
	public static final int THUMBNAIL_CURVES_SCREEN = 15;
	public static final int UNITS_SCREEN = 17;
	public static final int LOGOUT_SCREEN = 18;
	public static final int COOKIE_SCREEN = 19;
	public static final int BROWSER_SCREEN = 20;
	public static final int REGENERATE_SCREEN = 21;
	public static final int ITEM_XML_DOWNLOAD_SCREEN = 23;
	public static final int ITEM_XML_SCREEN = 24;
	public static final int NAVBAR_SCREEN = 25;      //present for languageUI purposes only
	public static final int CURVE_PREFS_SCREEN = 26;
	public static final int FOOTER_SCREEN = 27;      //present for languageUI purposes only
	public static final int LIFE_CYCLE_COST_SCREEN = 28;
	public static final int MULTI_SPEED_CURVES_SCREEN = 29;
	public static final int PERFORMANCE_DATASHEET_PDF = 30;
	public static final int PERFORMANCE_CURVE_PORTRAIT_PDF = 31;
	public static final int PERFORMANCE_CURVE_LANDSCAPE_PDF = 32;
	public static final int LOADINGPAGE_SCREEN = 33;
	public static final int MULTI_SPEED_CURVES_PORTRAIT_PDF = 34;
	public static final int MULTI_SPEED_CURVES_LANDSCAPE_PDF = 35;
	public static final int PRODUCT_LINE_OPTIONS_SCREEN = 36;
	public static final int LIFE_CYCLE_COST_PDF = 37;
	public static final int ADVANCED_SORT_SCREEN = 38;
	public static final int SYSTEM_DATA_SCREEN = 40;
	public static final int LIQUID_PROPERTIES_SCREEN = 41;
	public static final int ALL_PDF_PAGES = 43;
	public static final int DATASHEET_ADDITIONAL_DATA_SCREEN = 44;
	public static final int DATASHEET_ADDITIONAL_DATA_PDF_SCREEN = 45;
	public static final int SELECTOR_PERFORMANCE_CURVE_SCREEN = 46;
	public static final int DRIVER_RATING_SCREEN = 47;
	public static final int DRIVER_RATING_SUBMIT_SCREEN = 48;
	public static final int SAVE_URL_SCREEN = 49;
	public static final int ISO_DEBUG_SCREEN = 50;
	public static final int SELECTION_SEARCH_LOG_SCREEN = 51;
	public static final int NPSH_AVAILABLE_SCREEN = 52;
	public static final int NPSH_AVAILABLE_SUBMIT_SCREEN = 53;
	public static final int SCREEN_RESOLUTION_CHECK_SCREEN = 54;
	public static final int LIFE_CYCLE_COST_LOG_SCREEN = 55;
	public static final int MULTIPLE_CONDITIONS_SCREEN = 57;
	public static final int MULTIPLE_CONDITIONS_SUBMIT_SCREEN = 58;
	public static final int SEARCH_RESULTS_LOG_SCREEN = 59;
	//public static final int PERFORMANCE_DATASHEET_PD_SCREEN = 60;
	public static final int EDIT_USER_SCREEN = 61;
	public static final int PERFORMANCE_DATASHEET_PD_PDF = 64;
	public static final int ITO_CONDITIONS_OF_SERVICE_SCREEN = 65;
	public static final int DATASHEET_ITO_SCREEN = 66;
	public static final int PERFORMANCE_DATASHEET_ITO_PDF_SCREEN = 67;
	public static final int PDF_XML_SCREEN = 68;
	public static final int SERVER_CLIENT_TIME_SCREEN = 69;
	public static final int RESOURCE_STRING_SCREEN = 70;
	public static final int READ_ACCESS_STATUS_SCREEN = 71;
	public static final int MOTOR_PERFORMANCE_SCREEN = 72;
	public static final int MOTOR_PERFORMANCE_PDF_SCREEN = 73;
	public static final int XML_REFRESH_SCREEN = 74;
	public static final int NO_HELP_AVAILABLE_SCREEN = 75;
	public static final int HEAD_LOSS_SCREEN = 76;
	public static final int FITTING_SELECTION_SCREEN = 77;
	public static final int FITTING_SELECTION_SUBMIT_SCREEN = 78;
	public static final int SPECIAL_FITTING_SCREEN = 79;
	public static final int SPECIAL_FITTING_SUBMIT_SCREEN = 80;
	public static final int ROUGHNESS_SCREEN = 81;
	public static final int C_FACTOR_SCREEN = 82;
	public static final int ORG_SETUP_XML_SCREEN = 83;
	public static final int HEAD_LOSS_PDF_SCREEN = 84;
	public static final int VIEW_ALL_INSTANCES_SCREEN = 85;
	public static final int NAVBAR_DISPLAY_STYLE_SCREEN = 86;
	public static final int OUTPUT_GRAPH_SCREEN = 87;
	public static final int CURVE_COMMENT_SCREEN = 88;
	public static final int POPUP_SUBMIT_SCREEN = 89;
	public static final int SAVE_SETTINGS_REDIRECT_SCREEN = 90;
	public static final int API610_POPUP_SCREEN = 91;
	public static final int MAX_WORKING_PRESSURE_SCREEN = 92;
	public static final int MULTIPLE_CONDITIONS_DATASHEET_SCREEN = 93;
	public static final int MULTIPLE_CONDITIONS_DATASHEET_PDF_SCREEN = 94;
	public static final int QUOTE_XML_SCREEN = 95;
	public static final int CORE_SCREEN = 96;
	public static final int COMPRESSOR_COS_SCREEN = 97;
	public static final int START_COMPRESSOR_SCREEN = 98;
	public static final int COMPRESSOR_SEARCH_SCREEN = 99;
	public static final int COMPRESSOR_DATASHEET_SCREEN = 100;
	public static final int COMPRESSOR_SIZELIST_SCREEN = 101;
	public static final int COMPRESSOR_DATASHEET_PDF_SCREEN = 102;
	public static final int GAS_CONSTITUENTS_SCREEN = 103;
	public static final int REJECT_REASONS_SCREEN = 104;
	public static final int RECALC_PARENT_BROWSER_HTM_SCREEN = 105;
	public static final int CURVE_SQL_DATA_XML_SCREEN = 106;
	public static final int MOTOR_CURVE_SQL_DATA_XML_SCREEN = 107;
	public static final int NEW_ITEM_SCREEN = 108;
	public static final int SELECTOR_DOCUMENTS_SCREEN = 109;
	public static final int SAVE_PDF_DOCUMENTS = 110;
	public static final int REDIRECT_CONFIG_SCREEN = 111;
	public static final int SEND_EMAIL_SCREEN = 112;
	public static final int SAVE_AS_SCREEN = 113;

	/*
	 * servlet URLs
	 */
	public static final String BROWSER_URL = "/browser";
	public static final String CONDITIONS_OF_SERVICE_URL = "/conditionsofservice";
	public static final String COOKIE_URL = "/cookie";
	public static final String LOGIN_URL = "/login";
	public static final String LOGOUT_URL = "/logout";
	public static final String NAVIGATION_URL = "/navigation";
	public static final String PERFORMANCE_CURVE_URL = "/performancecurve";
	public static final String PERFORMANCE_DATASHEET_URL = "/performancedatasheet";
	public static final String PRODUCT_LINES_URL = "/productlines";
	public static final String PUMP_SIZE_LIST_URL = "/pumpsizelist";
	public static final String REGENERATE_URL = "/regenerate";
	public static final String SEARCH_RESULTS_URL = "/searchresults";
	public static final String SESSION_TIMEOUT_URL = "/sessiontimeout";
	public static final String START_PAGE_URL = "/start";
	public static final String THUMBNAIL_CURVES_URL = "/thumbnailcurves";
	public static final String ITEM_XML_DOWNLOAD_URL = "/itemxmldownload";
	public static final String ITEM_XML_URL = "/itemxml";
	public static final String ORG_SETUP_XML_URL = "/orgsetupxml";
	public static final String NAVBAR_URL = "/navbar";      //present for languageUI purposes only
	public static final String FOOTER_URL = "/footer";      //present for languageUI purposes only
	public static final String LIFE_CYCLE_COST_URL = "/lifecyclecost";
	public static final String MULTI_SPEED_CURVES_URL = "/multispeedcurves";
	public static final String PERFORMANCE_DATASHEET_PDF_URL = "/datasheetpdf";
	public static final String PERFORMANCE_CURVE_PORTRAIT_PDF_URL = "/curveportraitpdf";
	public static final String PERFORMANCE_CURVE_LANDSCAPE_PDF_URL = "/curvelandscapepdf";
	public static final String LOADINGPAGE_URL = "/loadingpage";
	public static final String MULTI_SPEED_CURVES_PORTRAIT_PDF_URL = "/mscurvesportraitpdf";
	public static final String MULTI_SPEED_CURVES_LANDSCAPE_PDF_URL = "/mscurveslandscapepdf";
	public static final String PRODUCT_LINE_OPTIONS_URL = "/productlineoptions";
	public static final String LIFE_CYCLE_COST_PDF_URL = "/lifecyclecostpdf";
	public static final String ADVANCED_SORT_URL = "/advancedSort"; //present for languageUI purposes only
	public static final String SYSTEM_DATA_URL = "/systemdata";
	public static final String LIQUID_PROPERTIES_URL = "/liquidproperties"; //present for languageUI purposes only
	public static final String ALL_PDF_PAGES_URL = "/pdfpage";  //present for languageUI purposes only
	public static final String DATASHEET_ADDITIONAL_DATA_URL = "/additionaldata";
	public static final String DATASHEET_ADDITIONAL_DATA_PDF_URL = "/additionaldatapdf";
	public static final String SELECTOR_PERFORMANCE_CURVE_URL = "/selectorperformancecurve";
	public static final String DRIVER_RATING_URL = "/driverrating";
	public static final String DRIVER_RATING_SUBMIT_URL = "/driverratingsubmit";
	public static final String SAVE_URL_URL = "/saveurl";
	public static final String ISO_DEBUG_URL = "/isodebug";
	public static final String SELECTION_SEARCH_LOG_URL = "/selectionlog";
	public static final String NPSH_AVAILABLE_URL = "/npshavailable"; // present for languageUI purposes only
	public static final String NPSH_AVAILABLE_SUBMIT_URL = "/npshavailablesubmit"; // present for languageUI purposes only
	public static final String SCREEN_RESOLUTION_CHECK_URL = "/screenresolutioncheck"; // present for languageUI purposes only
	public static final String LIFE_CYCLE_COST_LOG_URL = "/lcclog";
	public static final String MULTIPLE_CONDITIONS_URL = "/multipleconditions";
	public static final String MULTIPLE_CONDITIONS_SUBMIT_URL = "/multipleconditionssubmit";
	public static final String SEARCH_RESULTS_LOG_URL = "/searchresultslog";
	//public static final String PERFORMANCE_DATASHEET_PD_URL = "/performancedatasheet";
	public static final String PERFORMANCE_DATASHEET_PD_PDF_URL = "/datasheetpdpdf";
	public static final String ITO_CONDITIONS_OF_SERVICE_URL = "/itoconditionsofservice";
	public static final String DATASHEET_ITO_URL = "/itodatasheet";
	public static final String PERFORMANCE_DATASHEET_ITO_PDF_URL = "/itodatasheetpdf";
	public static final String PDF_XML_URL = "/pdfXML";
	public static final String SERVER_CLIENT_TIME_URL = "/serverclienttime";
	public static final String RESOURCE_STRING_URL = "/resourcestring";
	public static final String READ_ACCESS_STATUS_URL = "/readaccessstatus";
	public static final String MOTOR_PERFORMANCE_URL = "/motorPerformance";
	public static final String MOTOR_PERFORMANCE_PDF_URL = "/motorperformancepdf";
	public static final String XML_REFRESH_URL = "/xmlrefresh";
	public static final String NO_HELP_AVAILABLE_URL = "/nohelpavailable";
	public static final String HEAD_LOSS_URL = "/headloss";
	public static final String FITTING_SELECTION_URL = "/fittingselection";
	public static final String FITTING_SELECTION_SUBMIT_URL = "/fittingselectionsubmit";
	public static final String SPECIAL_FITTING_URL = "/specialfitting";
	public static final String SPECIAL_FITTING_SUBMIT_URL = "/specialfittingsubmit";
	public static final String ROUGHNESS_URL = "/roughness";
	public static final String C_FACTOR_URL = "/cfactor";
	public static final String HEAD_LOSS_PDF_URL = "/headloss.pdf";
	public static final String VIEW_ALL_INSTANCES_URL = "/viewAllInstances";
	public static final String NAVBAR_DISPLAY_STYLE_URL="/navBarDisplayStyle";
	public static final String OUTPUT_GRAPH_URL = "/OutputGraphServlet";
	public static final String CURVE_COMMENT_URL = "/curvecomment";
	public static final String POPUP_SUBMIT_URL = "/popupsubmit";
	public static final String SAVE_SETTINGS_REDIRECT_URL = "/SaveSettingsRedirect";
	public static final String API610_POPUP_URL = "/api610";
	public static final String MAX_WORKING_PRESSURE_URL = "/maxWorkingPressure";
	public static final String MULTIPLE_CONDITIONS_DATASHEET_URL = "/multipleConditionsDatasheet";
	public static final String MULTIPLE_CONDITIONS_DATASHEET_PDF_URL = "/multipleConditionsDatasheetPDF";
	public static final String QUOTE_XML_URL = "/quotexml";
	public static final String CORE_URL = "/core";
	public static final String COMPRESSOR_COS_URL = "/compressorCOS";
	/** this is the controller servlet for the {@link PageFactory} design */
	public static final String DISPLAY_SERVLET_URL = "/display";
	public static final String START_COMPRESSOR_URL = "/startCompressor";
	public static final String COMPRESSOR_SEARCH_URL = "/compressorSearch";
	public static final String COMPRESSOR_DATASHEET_URL = "/compressorDatasheet";
	public static final String COMPRESSOR_SIZELIST_URL = "/compressorSizeList";
	public static final String COMPRESSOR_DATASHEET_PDF_URL = "/compressorDatasheet.pdf";
	public static final String GAS_CONSTITUENTS_URL = "/gasConstituents";
	public static final String REJECT_REASONS_URL = "/rejectReasons";
	public static final String RECALC_PARENT_BROWSER_HTM_URL = "/recalcParentBrowserHtm";
	public static final String NEW_ITEM_URL = "/newItem";
	public static final String SELECTOR_DOCUMENTS_URL = "/selectorDocuments";
	public static final String SAVE_PDF_SERVLET = "savePDFServlet";  //TODO - investigate why there is no leading slash here
	public static final String REDIRECT_CONFIG_URL = "/redirectConfig";
	public static final String SEND_EMAIL_URL = "/sendEmail";
	public static final String SAVE_AS_URL = "/saveAs";

	/*
	 * JSPs
	 */
	public static final String BROWSER_JSP = "BrowserCheck.jsp";
	public static final String CONDITIONS_OF_SERVICE_XSL = "display?selectedURL=/conditionsofservice";
	public static final String COOKIE_JSP = "BrowserDiagnostics.jsp";
	public static final String LOGIN_JSP = "LoginSubmit.jsp";
	public static final String LOGOUT_JSP = "Logout.jsp";
	public static final String NAVIGATION_JSP = "NavigationFlags.jsp";
	public static final String PERFORMANCE_CURVE_XSL = "display?selectedURL=/performancecurve";
	public static final String PERFORMANCE_DATASHEET_XSL = "display?selectedURL=/performancedatasheet";
	public static final String PRODUCT_LINES_XSL = "display?selectedURL=/productlines";
	public static final String PUMP_SIZE_LIST_XSL = "display?selectedURL=/pumpsizelist";
	public static final String REGENERATE_JSP = "RegenFrameset.jsp";
	public static final String SEARCH_RESULTS_XSL = "display?selectedURL=/searchresults";
	public static final String SESSION_TIMEOUT_JSP = "/App/timeout"; //dummy variable, to be removed later
	public static final String START_PAGE_XSL = "display?selectedURL=/start";
	public static final String THUMBNAIL_CURVES_XSL = "display?selectedURL=/thumbnailcurves";
	public static final String UNITS_JSP = PARTY_PREFERENCES_PATH + "&preferencesTab=units&showDetailsPage=false&isPopupRequest=true&dirtyUserXT=true";
	public static final String ITEM_XML_DOWNLOAD_JSP = "ItemXMLDownload.jsp";
	public static final String ITEM_XML_JSP = "ItemXML.jsp";
	public static final String ORG_SETUP_XML_JSP = "OrgsetupXML.jsp";
	public static final String PROPERTIES_XML_JSP = "PropertiesXML.jsp";
	public static final String NAVBAR_XSL = "display?selectedURL=/navbar";
	public static final String CURVE_PREFS_JSP = PARTY_PREFERENCES_PATH + "&preferencesTab=curve&showDetailsPage=false&isPopupRequest=true&dirtyUserXT=true";
	public static final String FOOTER_XSL = "display?selectedURL=/footer";
	public static final String LIFE_CYCLE_COST_XSL = "display?selectedURL=/lifecyclecost";
	public static final String MULTI_SPEED_CURVES_XSL = "display?selectedURL=/multispeedcurves";
	public static final String PERFORMANCE_DATASHEET_PDF_JSP = "none";
	public static final String PERFORMANCE_CURVE_PORTRAIT_PDF_JSP = "none";
	public static final String PERFORMANCE_CURVE_LANDSCAPE_PDF_JSP = "none";
	public static final String LOADINGPAGE_JSP = "loading.jsp";
	public static final String MULTI_SPEED_CURVES_PORTRAIT_PDF_JSP = "none";
	public static final String MULTI_SPEED_CURVES_LANDSCAPE_PDF_JSP = "none";
	public static final String PRODUCT_LINE_OPTIONS_XSL = "display?selectedURL=/productlineoptions";
	public static final String LIFE_CYCLE_COST_PDF_JSP = "none";
	public static final String ADVANCED_SORT_XSL = "display?selectedURL=/advancedSort";
	public static final String SYSTEM_DATA_XSL = "display?selectedURL=/systemdata";
	public static final String LIQUID_PROPERTIES_XSL = "display?selectedURL=/liquidproperties&initialLoad=true";
	public static final String ALL_PDF_PAGES_JSP = "none";
	public static final String DATASHEET_ADDITIONAL_DATA_XSL = "display?selectedURL=/additionaldata";
	public static final String DATASHEET_ADDITIONAL_DATA_PDF_JSP = "none";
	public static final String SELECTOR_PERFORMANCE_CURVE_JSP = "none";
	public static final String DRIVER_RATING_XSL = "display?selectedURL=/driverrating&initialLoad=true";
	public static final String DRIVER_RATING_SUBMIT_JSP = "DriverRatingSubmit.jsp";
	public static final String SAVE_URL_JSP = "SaveURL.jsp";
	public static final String ISO_DEBUG_JSP = "ISOCurveLog.jsp";
	public static final String SELECTION_SEARCH_LOG_JSP = "SelectionLog.jsp";
	public static final String NPSH_AVAILABLE_XSL = "display?selectedURL=/npshavailable&initialLoad=true";
	public static final String NPSH_AVAILABLE_SUBMIT_JSP = "NPSHAvailableSubmit.jsp";
	public static final String SCREEN_RESOLUTION_CHECK_JSP = "ScreenResolutionCheck.jsp";
	public static final String LIFE_CYCLE_COST_LOG_JSP = "LCCLog.jsp";
	public static final String MULTIPLE_CONDITIONS_XSL = "display?selectedURL=/multipleconditions";
	public static final String MULTIPLE_CONDITIONS_SUBMIT_JSP = "MultipleConditionsSubmit.jsp";
	public static final String SEARCH_RESULTS_LOG_JSP = "SearchResultsLog.jsp";
	//public static final String PERFORMANCE_DATASHEET_PD_JSP = "PumpDetails.jsp";
	public static final String EDIT_USER_JSP = PARTY_PREFERENCES_PATH + "&preferencesTab=details&showDetailsPage=true&isPopupRequest=true&dirtyUserXT=false";
	public static final String PERFORMANCE_DATASHEET_PD_PDF_JSP = "none";
	public static final String ITO_CONDITIONS_OF_SERVICE_XSL = "display?selectedURL=/itoconditionsofservice";
	public static final String DATASHEET_ITO_XSL =  "display?selectedURL=/itodatasheet";
	public static final String PERFORMANCE_DATASHEET_ITO_PDF_JSP = "none";
	public static final String PDF_XML_JSP = "pdfXML.jsp";
	public static final String SERVER_CLIENT_TIME_JSP = "none";
	public static final String RESOURCE_STRING_JSP = "none";
	public static final String READ_ACCESS_STATUS_JSP = "none";
	public static final String MOTOR_PERFORMANCE_XSL = "display?selectedURL=/motorPerformance";
	public static final String MOTOR_PERFORMANCE_PDF_JSP = "none";
	public static final String XML_REFRESH_JSP = "XMLRefresh.jsp";
	public static final String NO_HELP_AVAILABLE_JSP = "noHelpAvailable.jsp";
	public static final String HEAD_LOSS_XSL ="display?selectedURL=/headloss";
	public static final String FITTING_SELECTION_XSL ="display?selectedURL=/fittingselection";
	public static final String FITTING_SELECTION_SUBMIT_JSP = "FittingSelectionSubmit.jsp";
	public static final String SPECIAL_FITTING_XSL = "display?selectedURL=/specialfitting";
	public static final String SPECIAL_FITTING_SUBMIT_JSP = "SpecialFittingSubmit.jsp";
	public static final String ROUGHNESS_XSL =  "display?selectedURL=/roughness";
	public static final String C_FACTOR_XSL = "display?selectedURL=/cfactor";
	public static final String HEAD_LOSS_PDF_JSP = "none";
	public static final String VIEW_ALL_INSTANCES_JSP = "ViewAllInstances.jsp";
	public static final String NAVBAR_DISPLAY_STYLE_JSP = "none";
	public static final String OUTPUT_GRAPH_JSP = "none";
	public static final String CURVE_COMMENT_XSL = "display?selectedURL=/curvecomment";
	public static final String API610_POPUP_XSL = "display?selectedURL=/api610";
	public static final String MAX_WORKING_PRESSURE_XSL = "display?selectedURL=/maxWorkingPressure";
	public static final String MULTIPLE_CONDITIONS_DATASHEET_XSL = "display?selectedURL=/multipleConditionsDatasheet";
	public static final String QUOTE_XML_JSP = "QuoteXML.jsp";
	public static final String RECALC_PARENT_BROWSER_HTM = "recalcParentBrowser.htm";
	public static final String CURVE_SQL_DATA_XML_JSP = "CurveSQLDataXML.jsp";
	public static final String MOTOR_CURVE_SQL_DATA_XML_JSP = "MotorCurveSQLDataXML.jsp";
	public static final String NEW_ITEM_JSP = "";
	public static final String SELECTOR_DOCUMENTS_XSL = "display?selectedURL=/selectorDocuments";
	public static final String SEND_EMAIL_XSL = "display?selectedURL=/sendEmail";
	public static final String SAVE_AS_XSL = "display?selectedURL=/saveAs";



	/*
	 * MISC VARS
	 */
	private static final Collection<String> supportsDocumentsPage =Arrays.asList(LIFE_CYCLE_COST_URL, PERFORMANCE_DATASHEET_URL, DATASHEET_ADDITIONAL_DATA_URL, MULTIPLE_CONDITIONS_DATASHEET_URL, PERFORMANCE_CURVE_URL, MULTI_SPEED_CURVES_URL, DATASHEET_ITO_URL, COMPRESSOR_DATASHEET_URL, MOTOR_PERFORMANCE_URL);


	/**
	 * Javascript files.
	 * @author Jeff Heigl
	 */
	public enum Javascript {
		COMMON_FUNCTIONS_JS("", "commonFunctions.js"),
		COMMON_FUNCTIONS_FOR_POPUP_JS("", "commonFunctionsForPopup.js"),
		COMMON_UTIL_FUNCTIONS_JS("/intelliquip/javascript", "common-util-functions.js"),
		DROPDOWN_SHARED_JS("/intelliquip/javascript", "dropdownShared.js"),
		DROPDOWN_JS("/intelliquip/javascript", "dropdown.js"),
		ADVANCED_TABLE_JS("/intelliquip/javascript", "advancedTable.js"),
		SILVERLIGHT_JS("/intelliquip/javascript", "Silverlight.js"),
		SILVERLIGHT_HELPER_JS("/intelliquip/javascript", "silverlightHelper.js"),
		IQ_COMMON_JS("", "iq_common.js"),
		ROBOHELP_CSH_JS("", "RoboHelp_CSH.js"),
		MCOLORPICKER_JS("/intelliquip/javascript", "mColorPicker.js"),
		PATH_JS("/intelliquip/javascript", ""),
		JQUERY_JS("/intelliquip/javascript", "jquery-1.6.2.min.js"){
			@Override
			public boolean isHostedInParty() {
				return true;
			}
		}
		;

		public final String relativeDir;
		public final String fileName;

		Javascript(String relativeDir, String fileName) {
			this.relativeDir = relativeDir;
			this.fileName = fileName;
		}

		public boolean isHostedInParty() {
			return false;
		}
	}


	private static Map<Integer, String> urlMap = new HashMap<Integer, String>();
	static
	{
		urlMap.put(CONDITIONS_OF_SERVICE_SCREEN, CONDITIONS_OF_SERVICE_URL);
		urlMap.put(NAVIGATION_SCREEN, NAVIGATION_URL);
		urlMap.put(LOGIN_SCREEN, LOGIN_URL);
		urlMap.put(PERFORMANCE_CURVE_SCREEN, PERFORMANCE_CURVE_URL);
		urlMap.put(PERFORMANCE_DATASHEET_SCREEN, PERFORMANCE_DATASHEET_URL);
		urlMap.put(PRODUCT_LINES_SCREEN, PRODUCT_LINES_URL);
		urlMap.put(PUMP_SIZE_LIST_SCREEN, PUMP_SIZE_LIST_URL);
		urlMap.put(SEARCH_RESULTS_SCREEN, SEARCH_RESULTS_URL);
		urlMap.put(SESSION_TIMEOUT_SCREEN, SESSION_TIMEOUT_URL);
		urlMap.put(START_PAGE_SCREEN, START_PAGE_URL);
		urlMap.put(THUMBNAIL_CURVES_SCREEN, THUMBNAIL_CURVES_URL);
		urlMap.put(LOGOUT_SCREEN, LOGOUT_URL);
		urlMap.put(COOKIE_SCREEN, COOKIE_URL);
		urlMap.put(BROWSER_SCREEN, BROWSER_URL);
		urlMap.put(REGENERATE_SCREEN, REGENERATE_URL);
		urlMap.put(ITEM_XML_SCREEN, ITEM_XML_URL);
		urlMap.put(ORG_SETUP_XML_SCREEN, ORG_SETUP_XML_URL);
		urlMap.put(NAVBAR_SCREEN, NAVBAR_URL);
		urlMap.put(FOOTER_SCREEN, FOOTER_URL);
		urlMap.put(LIFE_CYCLE_COST_SCREEN, LIFE_CYCLE_COST_URL);
		urlMap.put(MULTI_SPEED_CURVES_SCREEN, MULTI_SPEED_CURVES_URL);
		urlMap.put(PERFORMANCE_DATASHEET_PDF, PERFORMANCE_DATASHEET_PDF_URL);
		urlMap.put(PERFORMANCE_CURVE_PORTRAIT_PDF, PERFORMANCE_CURVE_PORTRAIT_PDF_URL);
		urlMap.put(PERFORMANCE_CURVE_LANDSCAPE_PDF, PERFORMANCE_CURVE_LANDSCAPE_PDF_URL);
		urlMap.put(LOADINGPAGE_SCREEN, LOADINGPAGE_URL);
		urlMap.put(MULTI_SPEED_CURVES_PORTRAIT_PDF, MULTI_SPEED_CURVES_PORTRAIT_PDF_URL);
		urlMap.put(MULTI_SPEED_CURVES_LANDSCAPE_PDF, MULTI_SPEED_CURVES_LANDSCAPE_PDF_URL);
		urlMap.put(PRODUCT_LINE_OPTIONS_SCREEN, PRODUCT_LINE_OPTIONS_URL);
		urlMap.put(LIFE_CYCLE_COST_PDF, LIFE_CYCLE_COST_PDF_URL);
		urlMap.put(ADVANCED_SORT_SCREEN, ADVANCED_SORT_URL);
		urlMap.put(SYSTEM_DATA_SCREEN, SYSTEM_DATA_URL);
		urlMap.put(LIQUID_PROPERTIES_SCREEN, LIQUID_PROPERTIES_URL);
		urlMap.put(ALL_PDF_PAGES, ALL_PDF_PAGES_URL);
		urlMap.put(DATASHEET_ADDITIONAL_DATA_SCREEN, DATASHEET_ADDITIONAL_DATA_URL);
		urlMap.put(DATASHEET_ADDITIONAL_DATA_PDF_SCREEN,DATASHEET_ADDITIONAL_DATA_PDF_URL);
		urlMap.put(SELECTOR_PERFORMANCE_CURVE_SCREEN,SELECTOR_PERFORMANCE_CURVE_URL);
		urlMap.put(DRIVER_RATING_SCREEN, DRIVER_RATING_URL);
		urlMap.put(DRIVER_RATING_SUBMIT_SCREEN, DRIVER_RATING_SUBMIT_URL);
		urlMap.put(ITEM_XML_DOWNLOAD_SCREEN, ITEM_XML_DOWNLOAD_URL);
		urlMap.put(SAVE_URL_SCREEN, SAVE_URL_URL);
		urlMap.put(ISO_DEBUG_SCREEN, ISO_DEBUG_URL);
		urlMap.put(SELECTION_SEARCH_LOG_SCREEN, SELECTION_SEARCH_LOG_URL);
		urlMap.put(NPSH_AVAILABLE_SCREEN, NPSH_AVAILABLE_URL);
		urlMap.put(NPSH_AVAILABLE_SUBMIT_SCREEN, NPSH_AVAILABLE_SUBMIT_URL);
		urlMap.put(SCREEN_RESOLUTION_CHECK_SCREEN, SCREEN_RESOLUTION_CHECK_URL);
		urlMap.put(LIFE_CYCLE_COST_LOG_SCREEN, LIFE_CYCLE_COST_LOG_URL);
		urlMap.put(MULTIPLE_CONDITIONS_SCREEN, MULTIPLE_CONDITIONS_URL);
		urlMap.put(MULTIPLE_CONDITIONS_SUBMIT_SCREEN, MULTIPLE_CONDITIONS_SUBMIT_URL);
		urlMap.put(SEARCH_RESULTS_LOG_SCREEN, SEARCH_RESULTS_LOG_URL);
		urlMap.put(PERFORMANCE_DATASHEET_PD_PDF, PERFORMANCE_DATASHEET_PD_PDF_URL);
		urlMap.put(ITO_CONDITIONS_OF_SERVICE_SCREEN, ITO_CONDITIONS_OF_SERVICE_URL);
		urlMap.put(DATASHEET_ITO_SCREEN, DATASHEET_ITO_URL);
		urlMap.put(PERFORMANCE_DATASHEET_ITO_PDF_SCREEN, PERFORMANCE_DATASHEET_ITO_PDF_URL);
		urlMap.put(PDF_XML_SCREEN, PDF_XML_URL);
		urlMap.put(SERVER_CLIENT_TIME_SCREEN, SERVER_CLIENT_TIME_URL);
		urlMap.put(RESOURCE_STRING_SCREEN, RESOURCE_STRING_URL);
		urlMap.put(READ_ACCESS_STATUS_SCREEN, READ_ACCESS_STATUS_URL);
		urlMap.put(MOTOR_PERFORMANCE_SCREEN, MOTOR_PERFORMANCE_URL);
		urlMap.put(MOTOR_PERFORMANCE_PDF_SCREEN, MOTOR_PERFORMANCE_PDF_URL);
		urlMap.put(XML_REFRESH_SCREEN, XML_REFRESH_URL);
		urlMap.put(NO_HELP_AVAILABLE_SCREEN, NO_HELP_AVAILABLE_URL);
		urlMap.put(HEAD_LOSS_SCREEN, HEAD_LOSS_URL);
		urlMap.put(FITTING_SELECTION_SCREEN, FITTING_SELECTION_URL);
		urlMap.put(FITTING_SELECTION_SUBMIT_SCREEN, FITTING_SELECTION_SUBMIT_URL);
		urlMap.put(SPECIAL_FITTING_SCREEN, SPECIAL_FITTING_URL);
		urlMap.put(SPECIAL_FITTING_SUBMIT_SCREEN, SPECIAL_FITTING_SUBMIT_URL);
		urlMap.put(ROUGHNESS_SCREEN, ROUGHNESS_URL);
		urlMap.put(C_FACTOR_SCREEN, C_FACTOR_URL);
		urlMap.put(HEAD_LOSS_PDF_SCREEN, HEAD_LOSS_PDF_URL);
		urlMap.put(NAVBAR_DISPLAY_STYLE_SCREEN, NAVBAR_DISPLAY_STYLE_URL);
		urlMap.put(OUTPUT_GRAPH_SCREEN, OUTPUT_GRAPH_URL);
		urlMap.put(CURVE_COMMENT_SCREEN, CURVE_COMMENT_URL);
		urlMap.put(POPUP_SUBMIT_SCREEN, POPUP_SUBMIT_URL);
		urlMap.put(API610_POPUP_SCREEN, API610_POPUP_URL);
		urlMap.put(MAX_WORKING_PRESSURE_SCREEN, MAX_WORKING_PRESSURE_URL);
		urlMap.put(MULTIPLE_CONDITIONS_DATASHEET_SCREEN, MULTIPLE_CONDITIONS_DATASHEET_URL);
		urlMap.put(MULTIPLE_CONDITIONS_DATASHEET_PDF_SCREEN, MULTIPLE_CONDITIONS_DATASHEET_PDF_URL);
		urlMap.put(QUOTE_XML_SCREEN, QUOTE_XML_URL);
		urlMap.put(CORE_SCREEN, CORE_URL);
		urlMap.put(COMPRESSOR_COS_SCREEN, COMPRESSOR_COS_URL);
		urlMap.put(START_COMPRESSOR_SCREEN, START_COMPRESSOR_URL);
		urlMap.put(COMPRESSOR_SEARCH_SCREEN, COMPRESSOR_SEARCH_URL);
		urlMap.put(COMPRESSOR_DATASHEET_SCREEN, COMPRESSOR_DATASHEET_URL);
		urlMap.put(COMPRESSOR_SIZELIST_SCREEN, COMPRESSOR_SIZELIST_URL);
		urlMap.put(COMPRESSOR_DATASHEET_PDF_SCREEN, COMPRESSOR_DATASHEET_PDF_URL);
		urlMap.put(GAS_CONSTITUENTS_SCREEN, GAS_CONSTITUENTS_URL);
		urlMap.put(REJECT_REASONS_SCREEN, REJECT_REASONS_URL);
		urlMap.put(RECALC_PARENT_BROWSER_HTM_SCREEN, RECALC_PARENT_BROWSER_HTM_URL);
		urlMap.put(NEW_ITEM_SCREEN, NEW_ITEM_URL);
		urlMap.put(LIQUID_PROPERTIES_SCREEN, LIQUID_PROPERTIES_URL);
		urlMap.put(SELECTOR_DOCUMENTS_SCREEN, SELECTOR_DOCUMENTS_URL);
		urlMap.put(SAVE_PDF_DOCUMENTS, SAVE_PDF_SERVLET);
		urlMap.put(REDIRECT_CONFIG_SCREEN, REDIRECT_CONFIG_URL);
		urlMap.put(SEND_EMAIL_SCREEN, SEND_EMAIL_URL);
		urlMap.put(SAVE_AS_SCREEN, SAVE_AS_URL);

	}

	private static Map<Integer, String> jspMap = new HashMap<Integer, String>();
	static
	{
		jspMap.put(CONDITIONS_OF_SERVICE_SCREEN, CONDITIONS_OF_SERVICE_XSL);
		jspMap.put(NAVIGATION_SCREEN, NAVIGATION_JSP);
		jspMap.put(LOGIN_SCREEN, LOGIN_JSP);
		jspMap.put(PERFORMANCE_CURVE_SCREEN, PERFORMANCE_CURVE_XSL);
		jspMap.put(PERFORMANCE_DATASHEET_SCREEN, PERFORMANCE_DATASHEET_XSL);
		jspMap.put(PRODUCT_LINES_SCREEN, PRODUCT_LINES_XSL);
		jspMap.put(PUMP_SIZE_LIST_SCREEN, PUMP_SIZE_LIST_XSL);
		jspMap.put(SEARCH_RESULTS_SCREEN, SEARCH_RESULTS_XSL);
		jspMap.put(START_PAGE_SCREEN, START_PAGE_XSL);
		jspMap.put(THUMBNAIL_CURVES_SCREEN, THUMBNAIL_CURVES_XSL);
		jspMap.put(UNITS_SCREEN, UNITS_JSP);
		jspMap.put(LOGOUT_SCREEN, LOGOUT_JSP);
		jspMap.put(COOKIE_SCREEN, COOKIE_JSP);
		jspMap.put(BROWSER_SCREEN, BROWSER_JSP);
		jspMap.put(REGENERATE_SCREEN, REGENERATE_JSP);
		jspMap.put(ITEM_XML_SCREEN, ITEM_XML_JSP);
		jspMap.put(CURVE_SQL_DATA_XML_SCREEN, CURVE_SQL_DATA_XML_JSP);
		jspMap.put(MOTOR_CURVE_SQL_DATA_XML_SCREEN, MOTOR_CURVE_SQL_DATA_XML_JSP);
		jspMap.put(ORG_SETUP_XML_SCREEN, ORG_SETUP_XML_JSP);
		jspMap.put(NAVBAR_SCREEN, NAVBAR_XSL);
		jspMap.put(CURVE_PREFS_SCREEN, CURVE_PREFS_JSP);
		jspMap.put(FOOTER_SCREEN, FOOTER_XSL);
		jspMap.put(LIFE_CYCLE_COST_SCREEN, LIFE_CYCLE_COST_XSL);
		jspMap.put(MULTI_SPEED_CURVES_SCREEN, MULTI_SPEED_CURVES_XSL);
		jspMap.put(PERFORMANCE_DATASHEET_PDF, PERFORMANCE_DATASHEET_PDF_JSP);
		jspMap.put(PERFORMANCE_CURVE_PORTRAIT_PDF, PERFORMANCE_CURVE_PORTRAIT_PDF_JSP);
		jspMap.put(PERFORMANCE_CURVE_LANDSCAPE_PDF, PERFORMANCE_CURVE_LANDSCAPE_PDF_JSP);
		jspMap.put(LOADINGPAGE_SCREEN, LOADINGPAGE_JSP);
		jspMap.put(MULTI_SPEED_CURVES_PORTRAIT_PDF, MULTI_SPEED_CURVES_PORTRAIT_PDF_JSP);
		jspMap.put(MULTI_SPEED_CURVES_LANDSCAPE_PDF, MULTI_SPEED_CURVES_LANDSCAPE_PDF_JSP);
		jspMap.put(PRODUCT_LINE_OPTIONS_SCREEN, PRODUCT_LINE_OPTIONS_XSL);
		jspMap.put(LIFE_CYCLE_COST_PDF, LIFE_CYCLE_COST_PDF_JSP);
		jspMap.put(ADVANCED_SORT_SCREEN, ADVANCED_SORT_XSL);
		jspMap.put(SYSTEM_DATA_SCREEN, SYSTEM_DATA_XSL);
		jspMap.put(ALL_PDF_PAGES, ALL_PDF_PAGES_JSP);
		jspMap.put(DATASHEET_ADDITIONAL_DATA_SCREEN, DATASHEET_ADDITIONAL_DATA_XSL);
		jspMap.put(DATASHEET_ADDITIONAL_DATA_PDF_SCREEN,DATASHEET_ADDITIONAL_DATA_PDF_JSP);
		jspMap.put(SELECTOR_PERFORMANCE_CURVE_SCREEN,SELECTOR_PERFORMANCE_CURVE_JSP);
		jspMap.put(DRIVER_RATING_SCREEN, DRIVER_RATING_XSL);
		jspMap.put(DRIVER_RATING_SUBMIT_SCREEN, DRIVER_RATING_SUBMIT_JSP);
		jspMap.put(ITEM_XML_DOWNLOAD_SCREEN, ITEM_XML_DOWNLOAD_JSP);
		jspMap.put(SAVE_URL_SCREEN, SAVE_URL_JSP);
		jspMap.put(ISO_DEBUG_SCREEN, ISO_DEBUG_JSP);
		jspMap.put(SELECTION_SEARCH_LOG_SCREEN, SELECTION_SEARCH_LOG_JSP);
		jspMap.put(NPSH_AVAILABLE_SCREEN, NPSH_AVAILABLE_XSL);
		jspMap.put(NPSH_AVAILABLE_SUBMIT_SCREEN, NPSH_AVAILABLE_SUBMIT_JSP);
		jspMap.put(SCREEN_RESOLUTION_CHECK_SCREEN, SCREEN_RESOLUTION_CHECK_JSP);
		jspMap.put(LIFE_CYCLE_COST_LOG_SCREEN, LIFE_CYCLE_COST_LOG_JSP);
		jspMap.put(MULTIPLE_CONDITIONS_SCREEN, MULTIPLE_CONDITIONS_XSL);
		jspMap.put(MULTIPLE_CONDITIONS_SUBMIT_SCREEN, MULTIPLE_CONDITIONS_SUBMIT_JSP);
		jspMap.put(SEARCH_RESULTS_LOG_SCREEN, SEARCH_RESULTS_LOG_JSP);
		jspMap.put(EDIT_USER_SCREEN, EDIT_USER_JSP);
		jspMap.put(PERFORMANCE_DATASHEET_PD_PDF, PERFORMANCE_DATASHEET_PD_PDF_JSP);
		jspMap.put(ITO_CONDITIONS_OF_SERVICE_SCREEN, ITO_CONDITIONS_OF_SERVICE_XSL);
		jspMap.put(DATASHEET_ITO_SCREEN, DATASHEET_ITO_XSL);
		jspMap.put(PERFORMANCE_DATASHEET_ITO_PDF_SCREEN, PERFORMANCE_DATASHEET_ITO_PDF_JSP);
		jspMap.put(PDF_XML_SCREEN, PDF_XML_JSP);
		jspMap.put(SERVER_CLIENT_TIME_SCREEN, SERVER_CLIENT_TIME_JSP);
		jspMap.put(RESOURCE_STRING_SCREEN, RESOURCE_STRING_JSP);
		jspMap.put(READ_ACCESS_STATUS_SCREEN, READ_ACCESS_STATUS_JSP);
		jspMap.put(MOTOR_PERFORMANCE_SCREEN, MOTOR_PERFORMANCE_XSL);
		jspMap.put(MOTOR_PERFORMANCE_PDF_SCREEN, MOTOR_PERFORMANCE_PDF_JSP);
		jspMap.put(XML_REFRESH_SCREEN, XML_REFRESH_JSP);
		jspMap.put(NO_HELP_AVAILABLE_SCREEN, NO_HELP_AVAILABLE_JSP);
		jspMap.put(HEAD_LOSS_SCREEN, HEAD_LOSS_XSL);
		jspMap.put(FITTING_SELECTION_SCREEN, FITTING_SELECTION_XSL);
		jspMap.put(FITTING_SELECTION_SUBMIT_SCREEN, FITTING_SELECTION_SUBMIT_JSP);
		jspMap.put(SPECIAL_FITTING_SCREEN, SPECIAL_FITTING_XSL);
		jspMap.put(SPECIAL_FITTING_SUBMIT_SCREEN, SPECIAL_FITTING_SUBMIT_JSP);
		jspMap.put(ROUGHNESS_SCREEN, ROUGHNESS_XSL);
		jspMap.put(C_FACTOR_SCREEN, C_FACTOR_XSL);
		jspMap.put(HEAD_LOSS_PDF_SCREEN, HEAD_LOSS_PDF_JSP);
		jspMap.put(VIEW_ALL_INSTANCES_SCREEN, VIEW_ALL_INSTANCES_JSP);
		jspMap.put(NAVBAR_DISPLAY_STYLE_SCREEN, NAVBAR_DISPLAY_STYLE_JSP);
		jspMap.put(OUTPUT_GRAPH_SCREEN, OUTPUT_GRAPH_JSP);
		jspMap.put(CURVE_COMMENT_SCREEN, CURVE_COMMENT_XSL);
		jspMap.put(API610_POPUP_SCREEN, API610_POPUP_XSL);
		jspMap.put(MAX_WORKING_PRESSURE_SCREEN, MAX_WORKING_PRESSURE_XSL);
		jspMap.put(MULTIPLE_CONDITIONS_DATASHEET_SCREEN, MULTIPLE_CONDITIONS_DATASHEET_XSL);
		jspMap.put(QUOTE_XML_SCREEN, QUOTE_XML_JSP);
		jspMap.put(RECALC_PARENT_BROWSER_HTM_SCREEN, RECALC_PARENT_BROWSER_HTM);
		jspMap.put(NEW_ITEM_SCREEN, NEW_ITEM_JSP);
		jspMap.put(SELECTOR_DOCUMENTS_SCREEN, SELECTOR_DOCUMENTS_XSL);
		jspMap.put(SEND_EMAIL_SCREEN, SEND_EMAIL_XSL);
		jspMap.put(SAVE_AS_SCREEN, SAVE_AS_XSL);
	}

	private static Map<String, Integer> screenMap = new HashMap<String, Integer>();
	static
	{
		screenMap.put(CONDITIONS_OF_SERVICE_URL, CONDITIONS_OF_SERVICE_SCREEN);
		screenMap.put(NAVIGATION_URL, NAVIGATION_SCREEN);
		screenMap.put(LOGIN_URL, LOGIN_SCREEN);
		screenMap.put(PERFORMANCE_CURVE_URL, PERFORMANCE_CURVE_SCREEN);
		screenMap.put(PERFORMANCE_DATASHEET_URL, PERFORMANCE_DATASHEET_SCREEN);
		screenMap.put(PRODUCT_LINES_URL, PRODUCT_LINES_SCREEN);
		screenMap.put(PUMP_SIZE_LIST_URL, PUMP_SIZE_LIST_SCREEN);
		screenMap.put(SEARCH_RESULTS_URL, SEARCH_RESULTS_SCREEN);
		screenMap.put(SESSION_TIMEOUT_URL, SESSION_TIMEOUT_SCREEN);
		screenMap.put(START_PAGE_URL, START_PAGE_SCREEN);
		screenMap.put(THUMBNAIL_CURVES_URL, THUMBNAIL_CURVES_SCREEN);
		screenMap.put(LOGOUT_URL, LOGOUT_SCREEN);
		screenMap.put(COOKIE_URL, COOKIE_SCREEN);
		screenMap.put(BROWSER_URL, BROWSER_SCREEN);
		screenMap.put(REGENERATE_URL, REGENERATE_SCREEN);
		screenMap.put(ITEM_XML_URL, ITEM_XML_SCREEN);
		screenMap.put(ORG_SETUP_XML_URL, ORG_SETUP_XML_SCREEN);
		screenMap.put(NAVBAR_URL, NAVBAR_SCREEN);
		screenMap.put(FOOTER_URL, FOOTER_SCREEN);
		screenMap.put(LIFE_CYCLE_COST_URL, LIFE_CYCLE_COST_SCREEN);
		screenMap.put(MULTI_SPEED_CURVES_URL, MULTI_SPEED_CURVES_SCREEN);
		screenMap.put(PERFORMANCE_DATASHEET_PDF_URL, PERFORMANCE_DATASHEET_PDF);
		screenMap.put(PERFORMANCE_CURVE_PORTRAIT_PDF_URL, PERFORMANCE_CURVE_PORTRAIT_PDF);
		screenMap.put(PERFORMANCE_CURVE_LANDSCAPE_PDF_URL, PERFORMANCE_CURVE_LANDSCAPE_PDF);
		screenMap.put(LOADINGPAGE_URL, LOADINGPAGE_SCREEN);
		screenMap.put(MULTI_SPEED_CURVES_PORTRAIT_PDF_URL, MULTI_SPEED_CURVES_PORTRAIT_PDF);
		screenMap.put(MULTI_SPEED_CURVES_LANDSCAPE_PDF_URL, MULTI_SPEED_CURVES_LANDSCAPE_PDF);
		screenMap.put(PRODUCT_LINE_OPTIONS_URL, PRODUCT_LINE_OPTIONS_SCREEN);
		screenMap.put(LIFE_CYCLE_COST_PDF_URL, LIFE_CYCLE_COST_PDF);
		screenMap.put(ADVANCED_SORT_URL, ADVANCED_SORT_SCREEN);
		screenMap.put(SYSTEM_DATA_URL, SYSTEM_DATA_SCREEN);
		screenMap.put(LIQUID_PROPERTIES_URL, LIQUID_PROPERTIES_SCREEN);
		screenMap.put(ALL_PDF_PAGES_URL, ALL_PDF_PAGES);
		screenMap.put(DATASHEET_ADDITIONAL_DATA_URL, DATASHEET_ADDITIONAL_DATA_SCREEN);
		screenMap.put(DATASHEET_ADDITIONAL_DATA_PDF_URL, DATASHEET_ADDITIONAL_DATA_PDF_SCREEN);
		screenMap.put(SELECTOR_PERFORMANCE_CURVE_URL, SELECTOR_PERFORMANCE_CURVE_SCREEN);
		screenMap.put(DRIVER_RATING_URL, DRIVER_RATING_SCREEN);
		screenMap.put(DRIVER_RATING_SUBMIT_URL, DRIVER_RATING_SUBMIT_SCREEN);
		screenMap.put(ITEM_XML_DOWNLOAD_URL, ITEM_XML_DOWNLOAD_SCREEN);
		screenMap.put(NPSH_AVAILABLE_URL, NPSH_AVAILABLE_SCREEN);
		screenMap.put(NPSH_AVAILABLE_SUBMIT_URL, NPSH_AVAILABLE_SUBMIT_SCREEN);
		screenMap.put(SCREEN_RESOLUTION_CHECK_URL, SCREEN_RESOLUTION_CHECK_SCREEN);
		screenMap.put(LIFE_CYCLE_COST_LOG_URL, LIFE_CYCLE_COST_LOG_SCREEN);
		screenMap.put(MULTIPLE_CONDITIONS_URL, MULTIPLE_CONDITIONS_SCREEN);
		screenMap.put(MULTIPLE_CONDITIONS_SUBMIT_URL, MULTIPLE_CONDITIONS_SUBMIT_SCREEN);
		screenMap.put(SEARCH_RESULTS_LOG_URL, SEARCH_RESULTS_LOG_SCREEN);
		screenMap.put(PERFORMANCE_DATASHEET_PD_PDF_URL, PERFORMANCE_DATASHEET_PD_PDF);
		screenMap.put(ITO_CONDITIONS_OF_SERVICE_URL, ITO_CONDITIONS_OF_SERVICE_SCREEN);
		screenMap.put(DATASHEET_ITO_URL, DATASHEET_ITO_SCREEN);
		screenMap.put(PERFORMANCE_DATASHEET_ITO_PDF_URL, PERFORMANCE_DATASHEET_ITO_PDF_SCREEN);
		screenMap.put(PDF_XML_URL, PDF_XML_SCREEN);
		screenMap.put(SERVER_CLIENT_TIME_URL, SERVER_CLIENT_TIME_SCREEN);
		screenMap.put(RESOURCE_STRING_URL, RESOURCE_STRING_SCREEN);
		screenMap.put(READ_ACCESS_STATUS_URL, READ_ACCESS_STATUS_SCREEN);
		screenMap.put(MOTOR_PERFORMANCE_URL, MOTOR_PERFORMANCE_SCREEN);
		screenMap.put(MOTOR_PERFORMANCE_PDF_URL, MOTOR_PERFORMANCE_PDF_SCREEN);
		screenMap.put(XML_REFRESH_URL, XML_REFRESH_SCREEN);
		screenMap.put(NO_HELP_AVAILABLE_URL, NO_HELP_AVAILABLE_SCREEN);
		screenMap.put(HEAD_LOSS_URL, HEAD_LOSS_SCREEN);
		screenMap.put(FITTING_SELECTION_URL, FITTING_SELECTION_SCREEN);
		screenMap.put(FITTING_SELECTION_SUBMIT_URL, FITTING_SELECTION_SUBMIT_SCREEN);
		screenMap.put(SPECIAL_FITTING_URL, SPECIAL_FITTING_SCREEN);
		screenMap.put(SPECIAL_FITTING_SUBMIT_URL, SPECIAL_FITTING_SUBMIT_SCREEN);
		screenMap.put(ROUGHNESS_URL, ROUGHNESS_SCREEN);
		screenMap.put(C_FACTOR_URL, C_FACTOR_SCREEN);
		screenMap.put(HEAD_LOSS_PDF_URL, HEAD_LOSS_PDF_SCREEN);
		screenMap.put(VIEW_ALL_INSTANCES_URL, VIEW_ALL_INSTANCES_SCREEN);
		screenMap.put(NAVBAR_DISPLAY_STYLE_URL, NAVBAR_DISPLAY_STYLE_SCREEN);
		screenMap.put(OUTPUT_GRAPH_URL, OUTPUT_GRAPH_SCREEN);
		screenMap.put(CURVE_COMMENT_URL, CURVE_COMMENT_SCREEN);
		screenMap.put(POPUP_SUBMIT_URL, POPUP_SUBMIT_SCREEN);
		screenMap.put(SAVE_SETTINGS_REDIRECT_URL, SAVE_SETTINGS_REDIRECT_SCREEN);
		screenMap.put(API610_POPUP_URL, API610_POPUP_SCREEN);
		screenMap.put(MAX_WORKING_PRESSURE_URL, MAX_WORKING_PRESSURE_SCREEN);
		screenMap.put(MULTIPLE_CONDITIONS_DATASHEET_URL, MULTIPLE_CONDITIONS_DATASHEET_SCREEN);
		screenMap.put(MULTIPLE_CONDITIONS_DATASHEET_PDF_URL, MULTIPLE_CONDITIONS_DATASHEET_PDF_SCREEN);
		screenMap.put(QUOTE_XML_URL, QUOTE_XML_SCREEN);
		screenMap.put(CORE_URL, CORE_SCREEN);
		screenMap.put(COMPRESSOR_COS_URL, COMPRESSOR_COS_SCREEN);
		screenMap.put(START_COMPRESSOR_URL, START_COMPRESSOR_SCREEN);
		screenMap.put(COMPRESSOR_SEARCH_URL, COMPRESSOR_SEARCH_SCREEN);
		screenMap.put(COMPRESSOR_DATASHEET_URL, COMPRESSOR_DATASHEET_SCREEN);
		screenMap.put(COMPRESSOR_SIZELIST_URL, COMPRESSOR_SIZELIST_SCREEN);
		screenMap.put(COMPRESSOR_DATASHEET_PDF_URL, COMPRESSOR_DATASHEET_PDF_SCREEN);
		screenMap.put(GAS_CONSTITUENTS_URL, GAS_CONSTITUENTS_SCREEN);
		screenMap.put(REJECT_REASONS_URL, REJECT_REASONS_SCREEN);
		screenMap.put(RECALC_PARENT_BROWSER_HTM_URL, RECALC_PARENT_BROWSER_HTM_SCREEN);
		screenMap.put(NEW_ITEM_URL, NEW_ITEM_SCREEN);
		screenMap.put(LIQUID_PROPERTIES_URL, LIQUID_PROPERTIES_SCREEN);
		screenMap.put(SELECTOR_DOCUMENTS_URL, SELECTOR_DOCUMENTS_SCREEN);
		screenMap.put(SAVE_PDF_SERVLET, SAVE_PDF_DOCUMENTS);
		screenMap.put(REDIRECT_CONFIG_URL, REDIRECT_CONFIG_SCREEN);
		screenMap.put(SEND_EMAIL_URL, SEND_EMAIL_SCREEN);
		screenMap.put(SAVE_AS_URL, SAVE_AS_SCREEN);
	}

	public static String getURLByScreenID(int screenID) {
		String url = urlMap.get(screenID);
		if(url == null) {
			throw new RuntimeException("ScreenNames.getURLByScreenID(): url is null. screenID is " + screenID);
		}
		return url;
	}

	/**
	 * retrieve URL and remove leading '/'
	 * @param screenID
	 * @return - url without leading '/'
	 */
	public static String getURLByScreenIDWithoutSlash(int screenID) {
		return removeSlashFromURL(ScreenNames.getURLByScreenID(screenID));
	}

	/**
	 * remove leading '/' if exists
	 * @param url
	 * @return - url without leading '/'
	 */
	public static String removeSlashFromURL(String url) {
		String retVal = url;
		if(retVal != null) {
			int idx = retVal.indexOf("/");
			if (idx>=0) {
				retVal = retVal.substring(idx+1);  //remove leading '/'
			}
		}
		return retVal;
	}

	public static String getJSPByScreenID(int screenID)
	{
		return jspMap.get(screenID);
	}

	public static int getScreenIDByURL(String url)
	{
		String selectedURL = ScreenFlowManager.stripURL(url);
		int retVal = START_PAGE_SCREEN;
		if (selectedURL != null)
		{
			try {
				retVal = screenMap.get(selectedURL);
			}
			catch (NullPointerException ex) {
				log.error("The URL \"" + selectedURL + "\" does not exist in the screenMap.", ex);
			}
		}
		return retVal;
	}

	/**
	 * check if the url is defined in {@link #screenMap} and the screenID is greater than 0
	 * @param url
	 * @return
	 */
	public static boolean isValidUrl(String url) {
		String baseUrl = ServletUtils.removeParamsFromUrl(url);
		Integer screenID = screenMap.get(baseUrl);
		return screenID != null && screenID > 0;
	}


	public static String getJspByUrl(String url) {
		return ScreenNames.getJSPByScreenID(ScreenNames.getScreenIDByURL(url));
	}

	/**
	 * check if this jsp resides in the Party Management web app
	 *
	 * @param servletUrl
	 * @return boolean
	 */
	public static boolean isPartyPreferencesURL(String servletUrl) {
		return servletUrl.startsWith(PARTY_PREFERENCES_PATH);
	}

	public static boolean pageSupportsDocuments(String currentPage) {
		return supportsDocumentsPage.contains(currentPage);
	}
}
